package com.molin.threadTest.threadSecurety.funccode;

public class Demo {
    public static void main(String[] args) {
        TicketRunnable tk = new TicketRunnable();
        Thread thread1 = new Thread(tk);
        Thread thread2 = new Thread(tk);
        Thread thread3 = new Thread(tk);

        thread1.setName("售票窗口1");
        thread2.setName("售票窗口2");
        thread3.setName("售票窗口3");

        thread1.start();
        thread2.start();
        thread3.start();
    }
}
